package com.meihua.shellapp.fragment;


import android.graphics.drawable.AnimationDrawable;
import android.view.View;
import android.view.animation.Animation;
import android.view.animation.AnimationUtils;
import android.view.animation.LinearInterpolator;
import android.widget.ImageView;
import android.widget.RelativeLayout;

import com.meihua.shellapp.R;
import com.meihua.shellapp.base.BaseFragment;

import butterknife.Bind;

/**
 * 积分商城
 */
public class IntegralFragment extends BaseFragment {
    @Bind(R.id.top_rl_search)
    RelativeLayout mRlSearch;
    @Bind(R.id.iv_notice)
    ImageView ivNotice;
    @Override
    protected int getLayoutResource() {
        return R.layout.fragment_integral;
    }

    @Override
    protected void initView() {
        mRlSearch.setVisibility(View.VISIBLE);
        danceWithTheWind();
    }


    /**
     * 启动嘴动画  boy
     */
    private void danceWithTheWind() {
        AnimationDrawable anim_mouth;
        ivNotice.setImageResource(R.drawable.anim_integral_noopening_notice);
        anim_mouth = (AnimationDrawable) ivNotice.getDrawable();
        anim_mouth.start();

    }

    private void dsdd(View v) {
        Animation operatingAnim = AnimationUtils.loadAnimation(getActivity(), R.anim.rotate_anim_no_open);
        LinearInterpolator lin = new LinearInterpolator();
        operatingAnim.setInterpolator(lin);
        v.startAnimation(operatingAnim);
    }
}
